// Bachelor of Software Engineering 
// Media Design School 
// Auckland
// New Zealand
// 
// (c) 2005 - 2014 Media Design School 
// 
// File Name : Stock.h
// Description : Stock header
// Author : Serge Radinovich
// Mail : srad015@hotmail.com

#pragma once

#include "CardPileGroup.h"
#include "Move.h"

//Piles in top-left corner of the screen (includes Waste)
class Stock : public CardPileGroup
{

	void StockToWaste(const int _iCardCount);
	void RepopulateStock();

	std::stack<StockMove*> m_StockMoves;		//Stack of moves that are specific to the stock (used to undo those moves)

public:

	Stock(std::list<Card*>* _pCards);
	~Stock(void);



	static const int s_kiTop = 50;					//Top left of left-most pile
	static const int s_kiLeft = 10;

	static const int kiFreeLeft = 114;				//Left-most point of waste pile
	static const int kiDistBetweenCards = 20;		//Distance between cards in waste pile that are facing up


	void UndoDeckClick();
	void ArrangeCardPositions();
	void ResupplyWaste();							//Happens when a card is successfully taken from waste
	bool DeckClicked(Vector2 _mouseClick);

	//Overloaded pure virtual functions from CardPileGroup
	void Draw();
	std::list<Card*>* AttemptCardGrab(Vector2 _clickPos, std::list<Card*>* grabbedCards);
	bool AttemptCardDeposit(Vector2 _clickPos, std::list<Card*>* _pGrabbedCards,  std::list<Card*>* &_pListDepositedTo);
	void UndoMove(Move* _move);
	
};

